package cn.edu.sjtu.se.dslab.DAO;

import cn.edu.sjtu.se.dslab.exception.DBException;
import cn.edu.sjtu.se.dslab.pojo.User;

	/**
	 * 按登录信息查询
	 * @param 登录名
	 * @param 登录密码
	 * @return 系统用户
	 * @throws RuntimeException
	 */
public interface IUserDAO extends IBaseDAO<Object> {

	public User findByLoginInfo(String loginname, String password) throws DBException;
	/**
	 * 获取查询hql语句
	 * @return hql语句
	 */
	public String getAllHql();
	/**
	 * 按登录名查询
	 * @param 登录名
	 * @return 系统用户
	 * @throws RuntimeException
	 */
	public User findByLoginname(String loginname) throws DBException;
	
	
	/**
	 * 	删除<BR>
	 * 	@param	数据集
	 * 	@throws	DBException
	 */
	public void delete(User obj) throws DBException ;
	/**
	 * 修改系统用户信息
	 * @param bean
	 * @throws DBException
	 */
	public void update(User bean) throws DBException;
	
	/**
	 * 根据id查找用户
	 * @param systemuserId
	 * @throws DBException
	 */
	public User findUserById(Long systemuserId) throws DBException;
}
